<?php
namespace app\index\controller;
use think\Db;
class Scenic extends Base{
    public function scenic(){
    	$scenic_spots=Db::name('scenic_spot')->where('state',1)->order('stars desc')->limit(6)->select();
        $this->assign('system',$this->system_set());
        $this->assign('scenic_spots',$scenic_spots);
        return $this->fetch();
    }
    public function scenic_detail(){
    	$detail=Db::name('scenic_spot')->where('id',input('get.id'))->find();
        $this->assign('system',$this->system_set());
        $this->assign('detail',$detail);
        return $this->fetch();
    }
}